<@home.head title="状态信息">
	<@home.common_list/>
	
	<script>
		var updateState = function(optFlag){
			if($("input[name=stateIds]:checked").size()==0){
				$.jBox.tip('请选择要操作的记录','warning',{top:'30px',closed:function() {return;}});
			}else{
				var deleteSubmit = function(v){
					if(!v){
						return true;
					}
					$("#optFlag").val(optFlag);
					$("#resultForm").attr("action","state_state_edit.shtml");
					$('#resultForm').ajaxSubmit(parentOptions); 
				};
				parent.$.jBox.confirm("确认要执行此操作吗?","操作提示",  deleteSubmit, { buttons: { '确定': true, '取消': false} });
			}
		};
	</script>
	
</@home.head>
<@home.body>
<form id="resultForm" method="POST" action="">
	<input type="hidden" name="optFlag" id="optFlag"/>
	<table width="100%" class="listTable" cellpadding="0" cellspacing="0">
		<thead>
			<tr>
				<th class="td_h"><input type="checkbox" name="selectAllCheckbox" id="selectAllCheckbox" onclick="javascript:selectAll(this,'checkAll')"/></th>
				<th class="td_h">状态编码</th>
				<th class="td_h">状态值</th>
				<th class="td_h">状态名称</th>
				<th class="td_h">描述</th>
				<th class="td_h">状态</th>
				<th class="td_h">操作</th>
			</tr>
		</thead>
		<tbody>
			<#if pageVO?exists && pageVO.resultList?exists>
				<#list pageVO.resultList as stateInfo>
					<tr>
						<td class="td_r" style="text-align:center"><input type="checkbox" name="stateIds" value="${stateInfo.stateId}"  onclick="singleSelect(this)" checkAttr='checkAll'/></td>
						<td class="td_r">${stateInfo.stateCode}&nbsp;</td>
						<td class="td_r">${stateInfo.stateValue}&nbsp;</td>
						<td class="td_r">${stateInfo.stateName}&nbsp;</td>
						<td class="td_r">${stateInfo.description}&nbsp;</td>
						<td class="td_r">${stateMap['DEL'][stateInfo.dataState]}&nbsp;</td>
						<td class="td_r">
							<#if AUTH_EDIT?? && AUTH_EDIT==1>
								<span title="编辑" class="img_edit hand" onclick="showDialogOnParent('${basePath}/sysmanage/dev/jump_state_edit_page.shtml?stateId=${stateInfo.stateId}','状态信息修改')"></span>
							</#if>
							<#if AUTH_DEL?? && AUTH_DEL==1>
								<span title="删除" class="img_delete hand" onclick="deleteObj('${basePath}/sysmanage/dev/state_del.shtml','${stateInfo.stateId}','');"></span>
							</#if>
						</td>
					</tr>
				</#list>
				<tr class="opttr">
					<td colspan="7" style="text-align:left;padding-top:5px;" >
						<button type="button" onclick="updateState(0)">
							<span class="icon_no">停用</span>
						</button>
						<button type="button" onclick="updateState(1)">
							<span class="icon_ok">正常</span>
						</button>
					</td>
				</tr>
			<#else>
				<tr>
					<td class="td_noresult" colspan="7">暂无相关数据!</td>
				</tr>
			</#if>
		</tbody>
	</table>
	<#if pageVO?exists>
		<script>
			$(this).pagination({
				'rowCount':${pageVO.rowCount},
				'pageNum':${pageVO.pageNum},
				'pageNo':${pageVO.pageNo},
				'firstBtnHandler':'fanYe(this)',
				'pageHandler':'fanYe(this)'
			});
		</script>
	</#if>
	</form>
</@home.body>
